<?php

namespace We7Test\Middleware;

use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;



/**
 * 中间件测试
 * Class HelloMiddleware
 */
class HelloMiddleware
{
	public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next)
	{
		$response = $response->withHeader('middlewaretest', '123');
		return $next($request, $response);
	}
}